<div class="bg-light lter b-b wrapper-md">
	<div class="row">
		<div class="col-sm-6 col-xs-12">
          <h1 class="m-n font-thin h3 text-black">订金管理</h1>
        </div>
	</div>
</div>
<div class="wrapper-md" ng-controller="MoneyCtrl">
	<div>
	    <a href="" ng-click="updateDJ()" class="btn btn-default btn-primary">设置订金比例</a>

		<div class="pull-right">
			<ui-select class="inline" style="width: 120px;" ng-model="query.state" theme="bootstrap">
		        <ui-select-match placeholder="全部状态">{{$select.selected.value}}</ui-select-match>
		        <ui-select-choices repeat="item.key as item in mappers.state | filter: $select.search">
		          <span ng-bind-html="item.value"></span>
		        </ui-select-choices>
		    </ui-select>
		    <ui-select class="inline" style="width: 80px;" ng-model="query.keywordType" theme="bootstrap">
		        <ui-select-match placeholder="选择类型">{{$select.selected.value}}</ui-select-match>
		        <ui-select-choices repeat="item.key as item in mappers.keywordType | filter: $select.search">
		          <span ng-bind-html="item.value"></span>
		        </ui-select-choices>
		    </ui-select>
		    <div class="form-inline inline" style="width: 120px;">
		    	<div class="input-group">
				   <input ng-model="query.keyword" type="text" class="form-control" placeholder="请输入搜索内容">
		    	</div>
		    </div>
		    <a href="" ng-click="submit()" class="btn btn-primary">查询</a>
	    </div>
    </div>

    <div class="panel panel-default" style="margin-top: 20px;">
	    <table st-table="rowCollectionPage" st-pipe="getItems" class="table table-striped">
	      <thead>
	        <tr>
	          <th>订单号</th>
	          <th>用户ID</th>
	          <th>手机号</th>
	          <th>用户名</th>
	          <th>需求预算</th>
	          <th>订金金额</th>
	          <th>支付时间</th>
	          <th>状态</th>
	          <th>操作</th>
	        </tr>
	      </thead>
	      <tbody>
	      	<tr ng-show="rowCollectionPage.length == 0">
	      		<td colspan="9" style="padding: 50px; text-align: center;">没有找到相应的内容</td>
	      	</tr>
	        <tr ng-repeat="row in rowCollectionPage">
	          <td>{{row.orderNo}}</td>
	          <td>{{row.userId}}</td>
	          <td>{{row.phone}}</td>
	          <td>{{row.userName}}</td>
	          <td>{{row.budgetPrice}}</td>
	          <td>{{row.price}}</td>
	          <td>{{row.modifyDate | date:'yyyy-MM-dd'}}</td>
	          <td>{{['待支付', '支付成功', '支付失败', '申请退款', '退款成功', '退款失败'][0 + row.state]}}</td>
	          <td>
  	          	<a ng-show="row.state == 1 || row.state == 5" href="" ng-click="del(row)">退款</a>
	          </td>
	        </tr>
	      </tbody>
	      <tfoot>
	        <tr>
	          <td colspan="9" class="text-right">
	          	<div class="inline pull-left" style="line-height: 60px">共 {{totalCount}} 条，{{pages}} 页</div>
	            <div st-pagination="" st-items-by-page="20" st-displayed-pages="7" class="no-margin inline"></div>
	          </td>
	        </tr>
	      </tfoot>
	    </table>
	  </div>
</div>